<template>
  <el-dialog :close-on-click-modal="false"   title="详情" :visible="show" :before-close="close">
    <el-descriptions :column="1" border>
      <el-descriptions-item label="设备编码">kooriookami</el-descriptions-item>
      <el-descriptions-item label="告警名称">18100000000</el-descriptions-item>
      <el-descriptions-item label="告警地址">苏州市</el-descriptions-item>
      <el-descriptions-item label="告警内容">江苏省苏州市吴中区吴中大道 1188 号</el-descriptions-item>
      <el-descriptions-item label="上报时间">2023-08-17 09:33:44</el-descriptions-item>
      <el-descriptions-item label="状态">告警中</el-descriptions-item>
      <el-descriptions-item label="最近数据">{'rjy':0.0}</el-descriptions-item>
    </el-descriptions>
    <div slot="footer" class="dialog-footer">
      <el-button type="primary" @click="close">关 闭</el-button>
    </div>
  </el-dialog>
</template>

<script>
export default {
  props: {
    /* 显示隐藏 */
    show: {
      type: Boolean,
      default: false
    },
    item: {
      type: Object,
      default: {}
    }
  },
  watch: {
    show: {
      handler(val) {
        if (val) {
          this.resetForm('form');
        }
      },
      immediate: true
    },
    item: {
      handler(val) {
        this.form = val || {};
      },
      immediate: true
    }
  },
  data() {
    return {
      form: {}
    };
  },
  methods: {
    close() {
      this.form = {};
      this.$emit('update:show', false);
    }
  }
};
</script>

<style lang="scss" scoped></style>
